<style>
.setimg{
	margin:-2px 5px 0 0 
}
#addform .file{
	position: relative;
}
#addform .file span{
	position: absolute;
	right: 80px;
	top: 15px;
	background-color: #414959;
	padding: 2px 6px;
	height: 23px;
	line-height: 23px;
	cursor: pointer;
	color: #fff;
	font-size: 14px;
	overflow: hidden;
	background-image: linear-gradient(to bottom, #6c7994, #414959);
	border-color: rgba(0, 0, 0, 0.1) rgba(0, 0, 0, 0.1) rgba(0, 0, 0, 0.25);
	border: 1px solid #363d4a;
	display: inline-block;
	*display: inline;
	*zoom: 1;
}
#addform .file span input{
	position: absolute;
	font-size: 100px;
	left: 0;
	top: 0;
	opacity: 0;
	filter: alpha(opacity=0);
	cursor: pointer;
}
</style>
<div class="row-fluid">
	<a style="border:1px solid #ccc" class="block-heading" data-toggle="collapse">列表数据</a>
    <div class="well">
	    <div class="btn-toolbar">
		    <form>
		    	<input class="input input-medium" type="text" name="user_name" value="<?=I('get.user_name')?>" style="width: 150px;text-align: center;margin-left: 10px;" placeholder="收货人"/>
		    	<input class="input input-medium" type="text" name="user_mobile" value="<?=I('get.user_mobile')?>" style="width: 150px;text-align: center;margin-left: 10px;" placeholder="手机号码"/>
				<select name="order_status" id="" style="width: 140px;margin-left: 10px;">
					<option value="" <?php if(I('get.order_status') === ''){echo 'selected';}?>>订单状态/全部</option>
					<option value="0" <?php if(I('get.order_status') === '0'){echo 'selected';}?>>待发货</option>
					<option value="1" <?php if(I('get.order_status') == 1){echo 'selected';}?>>已发货</option>
					<option value="2" <?php if(I('get.order_status') == 2){echo 'selected';}?>>已完成</option>
					<option value="-1" <?php if(I('get.order_status') == '-1'){echo 'selected';}?>>已取消</option>
				</select>
		    	<input type="hidden" value="<?=I('get.res')?>" name="res" />
		    	<button class="btn btn-info" style="margin:-9px 0 0 15px"><i class="icon-search"></i> 搜索</button>
		    </form>
		</div>
		<hr>
<?php
	$type = ['','普通积分','白金积分','钻石积分','体验积分','黄金积分','口腔积分'];
?>
		<table class="table">
		      <thead>
		        <tr>
		            <th style="text-align:center;">订单号</th>
		            <th style="text-align:center;">用户账号</th>
		            <th style="text-align:center;">用户姓名</th>
		            <th style="text-align:center;">商品名</th>
		            <th style="text-align:center;">数量</th>
		            <th style="text-align:center;">总价</th>
					<!--<th style="text-align:center;">购买人</th>-->
					<!--<th style="text-align:center;">手机号</th>-->
					<th style="text-align:center;">详细地址</th>
					<th style="text-align:center;">快递信息</th>
					<th style="text-align:center;">订单备注</th>
					<th style="text-align:center;">买家留言</th>
					<th style="text-align:center;">支付时间</th>
					<th style="text-align:center;">发货时间</th>
					<th style="text-align:center;">完成时间</th>
					<th style="text-align:center;">操作</th>
		        </tr>
		      </thead>
		      <tbody>
		      	<?php if($getData){foreach($getData AS $key=>$val){ ?>
		        <tr> 
		            <td style="text-align:center;vertical-align:middle;"><?=$val['order_id']?></td>
		            <td style="text-align:center;vertical-align:middle;"><?=$val['umobile']?></td>
		            <td style="text-align:center;vertical-align:middle;"><?=$val['uname']?></td>
		            <td style="text-align:center;vertical-align:middle;"><?=$val['jolly_name']?></td>
		            <td style="text-align:center;vertical-align:middle;"><?=$val['num']?></td>
		            <td style="text-align:center;vertical-align:middle;"><?=$val['total_price']?></td>
		            <!--<td style="text-align:center;vertical-align:middle;"><?=$val['user_name']?></td>-->
		            <!--<td style="text-align:center;vertical-align:middle;width: 150px"><?=$val['user_mobile']?></td>-->
		            <td style="text-align:center;vertical-align:middle;width: 150px"><?=$val['receive_address'].' '.$val['user_name'].' '.$val['user_mobile']?></td>
		            <td style="text-align:center;vertical-align:middle;width: 150px"><?=$val['express_com'].'/'.$val['express_num']?></td>
		            <td style="text-align:center;vertical-align:middle;width: 150px"><?=$val['remark']?></td>
		            <td style="text-align:center;vertical-align:middle;width: 150px"><?=$val['buyer_msg']?></td>
		            <td style="text-align:center;vertical-align:middle;width: 150px"><?=date('Y-m-d H:i',$val['add_at'])?></td>
		            <td style="text-align:center;vertical-align:middle;width: 150px"><?=$val['send_at']?date('Y-m-d H:i',$val['send_at']):'-'?></td>
		            <td style="text-align:center;vertical-align:middle;width: 150px"><?=$val['complete_at']?date('Y-m-d H:i',$val['complete_at']):'-'?></td>
					<td style="text-align:center;vertical-align:middle;">
						<?php if($val['order_status'] == '0'){?>
							<a class="ifrm btn btn-info" href="javascript:void(0)" data-url="/project/sendOrder" style="padding: 2px 4px;width: 60px;" data-width="650" data-height="480" data-title="发货" data-params="id/<?=$val['id']?>">发货</a>&nbsp;&nbsp;
							<a class="btn btn-info decate" href="/project/cancelJolly?id=<?=$val['id']?>" style="padding: 2px 4px;color: red;width: 60px;margin-top: 2px;" title="取消订单">取消订单</a>&nbsp;&nbsp;
						<?php }elseif($val['order_status'] == '1'){?>
							<a class="ifrm btn btn-info" href="javascript:void(0)" data-url="/project/editOrder" style="padding: 2px 4px;width: 60px;" data-width="650" data-height="480" data-title="发货" data-params="id/<?=$val['id']?>">详情</a>&nbsp;&nbsp;
						<?php }elseif($val['order_status'] == '2'){?>
							<span>已完成</span>
						<?php }elseif($val['order_status'] == '-1'){?>
							<span>已取消</span>
						<?php }?>
					</td>
		        </tr>
		        <?php }}else{?>
		        	<tr><td style="text-align:center" colspan=16>暂无数据</td></tr>
		        <?php }?>
		      </tbody>
		   </table>
		   <span style="float:right;margin-top:-44px"><?=$page?></span>
	</div>
</div>
<script>
$(function(){
	$('.decate').click(function(){
		if(!window.confirm('确认'+$(this).attr('title')+'吗 ?')){
			return false;
		}
		window.location = $(this).attr('href');
	});
})
</script>